<template>
  <div class="info-container">
    <p>{{place || '选择城市'}}</p>
    <br />
    <Citys class="city" :addr="place" @getAddress="setAddress"></Citys>
  </div>
</template>
<script>
import Citys from "../common/citySel/city";
export default {
  data() {
    return {
      place: ""
    };
  },
  components: {
    Citys
  },
  methods: {
    setAddress(str) {
      // 获取选择的城市 || 子组件传递过来的值
      console.log("选择的城市", str);
      this.place = str;
    }
  }
};
</script>
<style lang='scss' type='text/scss' scoped>
.info-container {
  width: 100%;
  padding: 0.1rem 0.3rem;

  box-sizing: border-box;

  .city {
    height: 0.8rem;
    line-height: 0.8rem;
    width: 100%;
    padding-left: 0.2rem;
    background: #f8f8f8;
    border-radius: 0.1rem;
    font-size: 0.3rem;
    color: #acacac;
    text-align: left;
  }
}
</style>